package com.wm.observer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @ClassName: ConcreteSubject
 * @Description: 具体的主题
 * @Author: WM
 * @Date: 2023/5/17 9:05
 */
public class ConcreteSubject extends Subject {
    private final Logger logger = LoggerFactory.getLogger(ConcreteSubject.class);

    @Override
    public void notifyObserver(String message) {
        for (Observer observer : observers) {
            logger.info("notify observer " + message + " change...");
            observer.changeData(message);
        }
    }
}
